package com.ruoyi.project.charging.mapper;

import java.util.List;
import com.ruoyi.project.charging.domain.TChargingMqttMsg;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

/**
 * 岸电MQTT消息原始数据Mapper接口
 * 
 * @author Yaoxuan Mo
 * @date 2025-07-28
 */
@Mapper
public interface TChargingMqttMsgMapper 
{
    /**
     * 查询岸电MQTT消息原始数据
     * 
     * @param msgid 岸电MQTT消息原始数据主键
     * @return 岸电MQTT消息原始数据
     */
    public TChargingMqttMsg selectTChargingMqttMsgByMsgid(String msgid);

    /**
     * 查询岸电MQTT消息原始数据列表
     * 
     * @param tChargingMqttMsg 岸电MQTT消息原始数据
     * @return 岸电MQTT消息原始数据集合
     */
    public List<TChargingMqttMsg> selectTChargingMqttMsgList(TChargingMqttMsg tChargingMqttMsg);

    /**
     * 新增岸电MQTT消息原始数据
     * 
     * @param tChargingMqttMsg 岸电MQTT消息原始数据
     * @return 结果
     */
    public int insertTChargingMqttMsg(TChargingMqttMsg tChargingMqttMsg);

    /**
     * 修改岸电MQTT消息原始数据
     * 
     * @param tChargingMqttMsg 岸电MQTT消息原始数据
     * @return 结果
     */
    public int updateTChargingMqttMsg(TChargingMqttMsg tChargingMqttMsg);

    /**
     * 删除岸电MQTT消息原始数据
     * 
     * @param msgid 岸电MQTT消息原始数据主键
     * @return 结果
     */
    public int deleteTChargingMqttMsgByMsgid(String msgid);

    /**
     * 批量删除岸电MQTT消息原始数据
     * 
     * @param msgids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTChargingMqttMsgByMsgids(String[] msgids);
    
    /**
     * 查询未转换的岸电MQTT消息原始数据列表
     * 
     * @return 岸电MQTT消息原始数据集合
     */
    public List<TChargingMqttMsg> selectAllTChargingMqttMsgNotConvert();

    public void handleConvertSuccess(@Param("tChargingMqttMsg") TChargingMqttMsg tChargingMqttMsg);

    public void handleConvertFail(@Param("tChargingMqttMsg") TChargingMqttMsg tChargingMqttMsg, @Param("failReason") String failReason);
}
